<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>课程展示</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript" src="webjars/jquery/3.5.0/jquery.js"></script>
    <script type="text/javascript" th:inline="javascript">

        /*<![CDATA[*/

        // function isDel(){
        //
        //     return alert("是否删除");
        // }

        /*]]>*/
    </script>
</head>
<body>
<nav class="navbar navbar-default navbar-static-top">
    <div class="container">
        <div class="navbar-header">

            <a class="navbar-brand" href="#">数据集的查询系统后台</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a th:href="@{/user/listU}">用户管理</a></li>
                <li><a th:href="@{/user/book/listB}">书籍管理</a></li>
                <li class="active"><a th:href="@{/user/coursera/listC}">课程管理<span class="sr-only">(current)</span></a></li>
                <li><a th:href="@{/select}">资源获取</a></li>
                <li><a th:href="@{/}">返回首页</a></li>
            </ul>
        </div><!--/.nav-collapse -->
    </div>
</nav>
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <h2 class="sub-header">课程管理</h2>
            <div class="div_select1">
                <form action="login_success.html" th:action="@{/user/coursera/select/list/coursera}" method="post"
                      id="form_coursera" name="form_coursera">

                    <input class="itxt" type="text" placeholder="请输入所属类别" autocomplete="off" tabindex="1" name="cname"
                           id="cname"/>
                    <br/>
                    <br/>
                    <input type="submit" value="查询课程" class="sub_btn" id="sub_c"/>
                </form>
            </div>
            <div class="table-responsive">
                <table class="table table-striped" th:if="${not #lists.isEmpty(listSelectCoursera)}">
                    <thead>
                    <tr>
                        <th>序号：</th>

                        <th>图片：</th>
                        <th>课程名：</th>
                        <th>所属大学：</th>

                        <th>链接：</th>
                        <th>所属类别：</th>
                        <th>操作:</th>
                        <th>操作:</th>
                    </tr>
                    </thead>
                    <tbody th:each="coursera:${listSelectCoursera}">
                    <tr>
                        <td><span th:text="${coursera.getCId()}"/></td>
                        <td><span><img th:src="${coursera.getCImg()}"/></span></td>
                        <td><span th:text="${coursera.getCName()}"/></td>
                        <td><span th:text="${coursera.getCUniversity()}"/></td>
                        <td><a th:text="课程链接" th:href="'https://www.coursera.org'+${coursera.getCLink()}"/></td>
                        <td><span th:text="${coursera.getCLevel()}"/></td>
                        <td><button type="button" class="btn btn-success"><a style="color: black" th:href="@{'update/'+${coursera.getCId()}}">编辑</a></button></td>
                        <td><button type="button" class="btn btn-danger"><a style="color: black" th:href="@{'delete/'+${coursera.getCId()}}" onclick="return confirm('确定将此记录删除?')">删除</a></button></td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="table-responsive">
                <table class="table table-striped" th:if="${not #lists.isEmpty(courseraList)}">
                    <thead>
                    <tr>
                        <th>序号：</th>

                        <th>图片：</th>
                        <th>课程名：</th>
                        <th>所属大学：</th>

                        <th>链接：</th>
                        <th>所属类别：</th>
                        <th>操作:</th>
                        <th>操作:</th>
                    </tr>
                    </thead>
                    <tbody th:each="coursera:${courseraList}">
                    <tr>
                        <td><span th:text="${coursera.getCId()}"/></td>
                        <td><span><img th:src="${coursera.getCImg()}"/></span></td>
                        <td><span th:text="${coursera.getCName()}"/></td>
                        <td><span th:text="${coursera.getCUniversity()}"/></td>
                        <td><a th:text="课程链接" th:href="'https://www.coursera.org'+${coursera.getCLink()}"/></td>
                        <td><span th:text="${coursera.getCLevel()}"/></td>
                        <td><button type="button" class="btn btn-success"><a style="color: black" th:href="@{'update/'+${coursera.getCId()}}">编辑</a></button></td>
                        <td><button type="button" class="btn btn-danger"><a style="color: black" th:href="@{'delete/'+${coursera.getCId()}}" onclick="return confirm('确定将此记录删除?')">删除</a></button></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<!--<div class="container">-->
<!--<table>-->
<!--    <tr>-->
<!--        <th>序号：</th>-->

<!--        <th>课程名：</th>-->
<!--        <th>所属大学：</th>-->
<!--        <th>评分：</th>-->
<!--        <th>链接：</th>-->
<!--        <th>所属类别：</th>-->
<!--        <th>操作:</th>-->
<!--    </tr>-->

<!--    <tr th:each="coursera:${courseraList}">-->
<!--        <td>-->
<!--            <span th:text="${coursera.getCId()}"/>-->
<!--        </td>-->
<!--        <td>-->
<!--            <span th:text="${coursera.getCName()}"/>-->
<!--        </td>-->
<!--        <td>-->
<!--            <span th:text="${coursera.getCUniversity()}"/>-->
<!--        </td>-->
<!--        <td>-->
<!--            <span th:text="${coursera.getCScore()}"/>-->
<!--        </td>-->

<!--        <td>-->
<!--            <a th:text="课程链接" th:href="'https://www.coursera.org'+${coursera.getCLink()}"/>-->
<!--        </td>-->
<!--        <td>-->
<!--            <span th:text="${coursera.getCLevel()}"/>-->
<!--        </td>-->

<!--        <td>-->
<!--            <a th:href="@{'update/'+${coursera.getCId()}}">编辑</a>-->
<!--        </td>-->
<!--        <td>-->
<!--            <a th:href="@{'delete/'+${coursera.getCId()}}">删除</a>-->
<!--        </td>-->

<!--        &lt;!&ndash;  th:href="@{text}"      th:href="@{'update/'+${users.id}}"&ndash;&gt;-->
<!--    </tr>-->



<!--</table>-->
<!--</div>-->
</body>
</html>
